﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace InsuranceAdjuster.OccasionallyConnected
{
    public interface IObjectStore : INotifyPropertyChanged
    {
        Dictionary<String, DateTime> ClientAnchors { get; }

        int Count { get; }
        void Clear();

        bool ContainsEntity(Guid entityGuid);
        bool ContainsEntity(IEntity entity);
        IEntity GetEntity(Guid entityGuid);
        T GetEntity<T>(Guid entityGuid) where T : IEntity;
        List<T> GetEntities<T>() where T : IEntity;
        void SetEntity(IEntity entity);
        void RemoveEntity(Guid entityGuid);

        ObservableCollection<Message> GetDurableMessages();
        Boolean IsMessagePersisted(Message message);
        void UpdateDurableMessage(Message message);

        DateTime GetAnchor(String table);
        void SetAnchor(String table, DateTime value);
    }

}
